﻿using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.Runtime;
using Autodesk.AutoCAD.Geometry;
using Autodesk.AutoCAD.EditorInput;
using System;

[assembly: CommandClass(typeof(MultiVersionComp.initialization))]
[assembly: CommandClass(typeof(MultiVersionComp.Command))]
namespace MultiVersionComp
{
    public class initialization : IExtensionApplication
    {
        void IExtensionApplication.Initialize()
        {
            throw new NotImplementedException();
        }

        void IExtensionApplication.Terminate()
        {
            throw new NotImplementedException();
        }
    }
    public class Command
    {
        [CommandMethod("hello")]
        public static void hello()
        {
            Document doc = Application.DocumentManager.MdiActiveDocument;
            Editor ed = doc.Editor;
#if (ac2010)
            ed.WriteMessage("This is AutoCAD 2010!");
#elif (ac2013)
            ed.WriteMessage("This is AutoCAD 2013!");
#elif (ac2020)
            ed.WriteMessage("This is AutoCAD 2020!");
#endif
        }

    }
}
